﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Country.aspx.cs" Inherits="Admin_Country" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   
    <style type="text/css">
        .style1
        {
            width: 800px;
        }
    </style>
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id= "Content">
    <table >
        <tr>
            <td colspan="2" style="text-align: center">
                Danh sách Quốc gia</td>
        </tr>
        <tr>
            <td >
                <asp:Label ID="Label1" runat="server"></asp:Label>
            </td>
            <td align ="right" class="style1" >
                <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="Thêm mới" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    Width="800px">
                    <Columns>
                        <asp:BoundField DataField="countrySymbol" HeaderText="Mã quốc gia" />
                        <asp:BoundField DataField="countryName" HeaderText="Tên" />
                        <asp:BoundField DataField="countrySummary" HeaderText="Thông tin" />
                        
                        <asp:TemplateField HeaderText="Thao tác">
                            <ItemTemplate>
                                <table >
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="lbEdit" runat="server" 
                                                CommandArgument='<%# Eval("countryID","{0}") %>' CommandName="Select" 
                                                onclick="lbEdit_Click">Sửa</asp:LinkButton>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="lbDelete" runat="server" 
                                                CommandArgument='<%# Eval("countryID","{0}") %>' CommandName="Select" 
                                                onclick="lbDelete_Click" onclientclick="return confirm('Are you sure?');">Xóa</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
    </div>
</asp:Content>

